﻿using System;
using System.Threading.Tasks;
using Thinker.SignChannel.Entities;
using Volo.Abp.Domain.Repositories;

namespace Thinker.SignChannel.Repositories;

public interface IPersonRepository : IRepository<Person, Guid>
{
    Task<Person?> FindByIdNumberAsync(string idNumber)
    {
        idNumber = idNumber.ToLower();
        return FindAsync(e => e.IdNumber.ToLower() == idNumber);
    }

    Task<Person?> FindByKeyAsync(string idNumber)
    {
        return FindByIdNumberAsync(idNumber);
    }
}